<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:74:"D:\phpStudy\WWW\fastAdmin\public/../application/food\view\index\index.html";i:1526541309;s:64:"D:\phpStudy\WWW\fastAdmin\application\food\view\common\base.html";i:1526525827;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>
    
        走心更走胃-首页
    
    </title>
    <link rel="stylesheet" type="text/css" href="/static/css/index.css" />
    
</head>

<body>
<!--头部开始-->
<header>
    <div class="logo"><img src="/static/images/logo.jpg" alt="" class="lazyload"></div>
    <div class="nav">
        <ul>
            <li><a href="/food">首页</a></li>
            <li><a href="#">关于我们</a></li>
            <li><a href="#">热量计算</a></li>
            <li><a href="food/comment">网站反馈</a></li>
        </ul>
    </div>
    <div class="search">
        <form action="/list">
            <input type="text" name="name">
        </form>
        <img src="/static/images/search.png" class="searchBtn lazyload">
    </div>
    <div class="login">
        <ul>
            <?php if(null ===\think\Session::get('user')): ?>
            <li><a href="<?php echo url('food/auth/register'); ?>">注册</a></li>
            <li><a href="<?php echo url('food/auth/login'); ?>">登录</a></li>
            <?php else: ?>
            <li style="margin-left: -20px;"><a href="#">欢迎您，<?php echo \think\Session::get('user.phone'); ?></a></li>
            <li><a href="/logout">退出</a></li>
            <?php endif; ?>
        </ul>
    </div>
</header>
<!--头部结束-->


<!--轮播图开始-->
<div id="jssor_1" style="margin:0 auto;width:780px;height:360px;overflow:hidden;">
    <div data-u="slides" style="width:780px;height:360px;overflow:hidden;">
        <div><img data-u="image" src="/static/images/slide1.jpg" class="lazyload"/></div>
        <div><img data-u="image" src="/static/images/slide2.jpg" class="lazyload"/></div>
        <div><img data-u="image" src="/static/images/slide3.jpg" class="lazyload"/></div>
        <div><img data-u="image" src="/static/images/slide4.jpg" class="lazyload"/></div>
        <div><img data-u="image" src="/static/images/slide5.jpg" class="lazyload"/></div>
    </div>
</div>


<div class="wrapper">
    
    <div class="tab">
        <ul>
            <?php if(is_array($categories) || $categories instanceof \think\Collection || $categories instanceof \think\Paginator): $k = 0; $__LIST__ = $categories;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$category): $mod = ($k % 2 );++$k;if($k == 1): ?>
            <li class="tab-item active"><?php echo $category['name']; ?><span>◆</span></li>
            <?php else: ?>
            <li class="tab-item"><?php echo $category['name']; ?><span>◆</span></li>
            <?php endif; endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
    <div class="menu">
        <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $key = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$items): $mod = ($key % 2 );++$key;if($key == 2): ?>
            <div class="main<?php echo $key-1; ?> product">
                <ul>
                    <?php if(is_array($items) || $items instanceof \think\Collection || $items instanceof \think\Paginator): $k = 0; $__LIST__ = $items;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($k % 2 );++$k;?>
                    <li>
                        <a href="<?php echo url('food/show/'.$item['id']); ?>"><img src="<?php echo $item['image']; ?>" alt="" class="lazyload" style="border-radius: 6px"><p><?php echo $item['name']; ?></p></a>
                    </li>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                    <div style="clear: both"></div>
                </ul>
            </div>
            <?php else: ?>
            <div class="main<?php echo $key-1; ?> product" style="display: none;">
                <div class="main">
                    <ul>
                        <?php if(is_array($items) || $items instanceof \think\Collection || $items instanceof \think\Paginator): $k = 0; $__LIST__ = $items;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($k % 2 );++$k;?>
                        <li>
                            <a href="<?php echo url('food/show/'.$item['id']); ?>"><img src="<?php echo $item['image']; ?>" alt="" class="lazyload"  data-original="/static/images/lazyload.gif" style="border-radius: 6px"><p><?php echo $item['name']; ?></p></a>
                        </li>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                        <div style="clear: both"></div>
                    </ul>
                </div>
            </div>
            <?php endif; endforeach; endif; else: echo "" ;endif; ?>
    </div>

    <section class="three" id="sec3">



        <!--相关推荐开始-->
        <div class="advice">
            <h3>一周热门</h3>
        </div>
        <div class="hot">
            <div class="hot-1">
                <ul>
                    <li>
                        <a href="hot-1.html"><img src="/static/images/2-1.jpg" alt="" class="lazyload" data-original="/static/images/lazyload.gif"></a> <a href="hot-1.html">
                        <p>银耳莲子汤</p>
                    </a>
                    </li>
                </ul>
            </div>
            <div class="hot-2">
                <ul>
                    <li>
                        <a href="hot-2.html"><img src="/static/images/2-2.jpg" alt="" class="lazyload" data-original="/static/images/lazyload.gif"></a> <a href="hot-2.html">
                        <p>花旗参麦冬养阴汤</p>
                    </a>
                    </li>
                </ul>
            </div>
            <div class="hot-3">
                <ul>
                    <li>
                        <a href="hot-3.html"><img src="/static/images/3-2.jpg" alt="" class="lazyload" data-original="/static/images/lazyload.gif"></a> <a href="hot-3.html">
                        <p>罗汉果瘦肉汤</p>
                    </a>
                    </li>
                </ul>
            </div>
            <div class="hot-4">
                <ul>
                    <li>
                        <a href="hot-4.html"><img src="/static/images/4-2.jpg" alt="" class="lazyload" data-original="/static/images/lazyload.gif"></a> <a href="hot-4.html">
                        <p>大豆芽菜猪血汤</p>
                    </a>
                    </li>
                </ul>
            </div>
            <div class="hot-5">
                <ul>
                    <li>
                        <a href="hot-5.html"><img src="/static/images/5-2.jpg" alt="" class="lazyload" data-original="/static/images/lazyload.gif"></a> <a href="hot-5.html">
                        <p>当归蛋汤</p>
                    </a>
                    </li>
                </ul>
            </div>

        </div>
        <!--相关推荐结束-->
    </section>

    <footer>
        <!--底部开始-->
        <div class="line">
            <h3>走胃更走心---吃得健康又营养!</h3>
        </div>
        <p class="link">友情链接: <a href="http://life.iqiyi.com/">爱奇艺生活</a> <a href="http://www.zhms.cn/">中华美食网</a>
            <a href="http://www.pcbaby.com.cn/">太平洋亲子网</a> <a href="http://food.poco.cn/">POCO美食网</a>
            <a href="http://www.21food.cn/">食品商务网</a> <a href="http://www.mama.cn/">妈妈网</a>
            <a href="http://www.39yst.com/">三九养生堂</a> <a href="http://www.258.com/">企业服务平台</a>
            <a href="http://www.yidianzixun.com/">一点资讯</a> <a href="http://www.hc360.com/">慧聪网</a>
        </p>
        <p class="copyright">版权所有 © 2004-2019 走心更走胃 保留所有权利</p>
        <!--底部结束-->
    </footer>
</div>
<script src="/static/js/jquery-1.11.1.js"></script>
<script src="/static/js/slider.min.js"></script>
<script type="text/javascript" src="//cdn.bootcss.com/jquery.lazyload/1.9.1/jquery.lazyload.min.js" ></script>

<script>
    $(function () {
        $(".tab>li").mouseenter(function () {
            $(this).addClass("active").siblings("li").removeClass("active");
            $(".menu div").eq($(this).index()).addClass("selected").siblings("div").removeClass("selected");
            // $(this).toggleClass("active").siblings("li").removeClass("active");
            // $(".menu>div").eq($(this).index()).toggleClass("selected").siblings("div").removeClass("selected");
        });
        $('.tab-item').click(function () {
            $(this).addClass('active').siblings().removeClass('active')
            var index = $(this).index();
            $('.main' + (index + 1)).show().siblings().hide()
        });

        $('.searchBtn').click(function() {
            $(this).prev().submit()
        });

        var options = {
            $AutoPlay: 1
        };
        var jssor_1_slider = new $JssorSlider$("jssor_1", options);
    });
</script>

</body>
</html>